#include <iostream>

int main() {
    int forbidden_age, accompany_age, q1, q2;
    
    std::cin >> forbidden_age >> accompany_age >> q1 >> q2;
    
    auto accept_1 = (q1 >= forbidden_age) || (q1 < forbidden_age && q2 >= accompany_age);
    auto accept_2 = (q2 >= forbidden_age) || (q2 < forbidden_age && q1 >= accompany_age);

    std::cout << q1 << '-' << (accept_1 ? "Y" : "N") << " ";
    std::cout << q2 << '-' << (accept_2 ? "Y" : "N") << "\n";

    if (accept_1 && accept_2) {
        if (q1 < forbidden_age || q2 < forbidden_age) {
            std::cout << "qing " << (q1 < q2 ? '2' : '1') << " zhao gu hao " << (q1 < q2 ? '1' : '2');
        } else {
            std::cout << "huan ying ru guan";
        }
    } else if (accept_1 || accept_2) {
        std::cout << (accept_1 ? '1' : '2') << ": huan ying ru guan";
    } else {
        std::cout << "zhang da zai lai ba";
    }
}
